<template>
  <div>
    <el-table :data="tableData" border style="width: 100%">
      <el-table-column
        prop="username"
        label="用户"
        width="180"
      ></el-table-column>
      <el-table-column prop="lastLogin.ip" label="ip地址" width="180">
      </el-table-column>
      <el-table-column prop="lastLogin.loginTime" label="登录时间">
      </el-table-column>
      <el-table-column prop="_id" label="唯一标识符"> </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { getLogs } from "@/api";
export default {
  data() {
    return {
      tableData: [],
    };
  },
  created() {
    getLogs(1, 15).then((res) => {
      this.tableData = res.data.data;
      console.log(this.tableData);
    });
  },
};
</script>

<style scoped>
>>> .el-table th > .cell {
  text-align: center;
}

>>> .el-table .cell {
  text-align: center;
}
</style>
